Creating dev container and vscode tasks#449
Conversation
|
Was hoping the automatic docker build would trigger with this PR. I have a hunch that a new build would resolve some current issues being seen simply by pulling a new version of yt-dlp. |
|
Pretty sure the test failures are related to #448 and not these changes. There isn't anything in here that should affect the tests at all. |
| }, | ||
| "postCreateCommand": { | ||
| "yarn install": "yarn global add freyr", | ||
| "install build tools": "sudo apt-get update && sudo apt install cmake -y" |
There was a problem hiding this comment.
Never dealt with devcontainers before, but does it presuppose a debian-based environment? what if apt-get is unavailable?
There was a problem hiding this comment.
Yea it is a debian container with some basic dependencies installed. The image details are here:
https://hub.docker.com/_/microsoft-devcontainers-javascript-node?tab=description
| "program": "${workspaceFolder}/cli.js", | ||
| "args": [ | ||
| "spotify:artist:6M2wZ9GZgrQXHCFfjv46we", | ||
| "--no-auth" | ||
| ], |
There was a problem hiding this comment.
Let's substitute this for npm test spotify.track or npm test spotify.artist
There was a problem hiding this comment.
Sounds good. Replaced the launch configurations with the npm test ... calls.
The console isn't showing the full output for this, which makes debugging a bit trickier. I think there is a launch setting in vscode that will attach it to stdout so I'm gonna try to find that.
There was a problem hiding this comment.
Added flag to capture stdout in the vscode debug console.
|
If you want to give the dev container a test run, all you should need to do is run the vscode task Debugging uses the 3 different configurations in 'launch.json' and breakpoints work in the code. |
Creating files that help with local development in visual studio code. These do not affect the build at all, but allow for development inside a container with all necessary dependencies.